package com.beiming.moudle.auth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.beiming.moudle.auth.entity.BussEntity;
import com.beiming.moudle.auth.entity.BussUserEntity;
import com.beiming.moudle.auth.entity.UserEntity;


public interface BussUserService extends IService<BussUserEntity> {
    String getBussLoginUser(int id);
    /**
     * 根据用户名查找用户
     * @param username
     * @return
     */
    BussUserEntity findByUsername(String username);

    /**
     * 为user生成token
     * @param user
     * @return
     */
    String createToken(BussUserEntity user);

    /**
     * 根据token去修改用户token ，使原本token失效
     * @param token
     */
    void logout(String token);

    /**
     * 根据token获取用户信息
     * @param token
     * @return
     */
    BussUserEntity findByToken(String token);
}

